package com.shanyi.sendmsg.tool;

import com.shanyi.sendmsg.dto.resp.WeatherInfoRespDto;
import org.springframework.stereotype.Service;

@Service
public class WeaObject2Str {
    public static String weaObject2Str(WeatherInfoRespDto dto) {
        return new StringBuilder()
                .append(dto.getDateTime())
                .append(" ")
                .append(dto.getCity())
                .append(" 天气:")
                .append(dto.getWeather())
                .append(" 气温:")
                .append(dto.getMinTem())
                .append("~")
                .append(dto.getMaxTem())
                .append("℃")
                .toString();
    }
}
